//
//  main.m
//  字典模型示例
//
//  Created by J on 15/11/28.
//  Copyright © 2015年 J. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "MJExtension.h"
#import "Status.h"
#import "User.h"
#import "Person.h"
#import "Book.h"
int main(int argc, const char * argv[]) {
    @autoreleasepool {
        NSDictionary * dict = @{
                                @"name":@"张三",
                                @"books":@[
                                        @{
                                            @"name":@"葵花1",
                                            @"price":@"10.6"
                                            
                                            },
                                        @{
                                            @"name":@"葵花2",
                                            @"price":@"14.6"
                                            
                                            },
                                        @{
                                            @"name":@"葵花3",
                                            @"price":@"18.6"
                                            
                                            },
                                        @{
                                            @"name":@"葵花4",
                                            @"price":@"13.6"
                                            
                                            },
                                        
                                        ]
                                };
        
        Person * person =[Person objectWithKeyValues:dict];
        
        
        
        
         }
    return 0;
}



void test2(){
    
    
    
    Status * status = [[Status alloc]init];
    status.myText = @"哈哈";
    User * user= [[User alloc]init];
    user.profile_image_url = @"ddd.png";
    user.idstr = @"ddd";
    user.name = @"旺财";
    
    status.user = user;
    NSDictionary* dict =   [status keyValues];
    
    NSLog(@"%@",dict);

    
    
}

 void test(){
    
    
    
    NSDictionary * dic = @{
                           @"id":@"1234",
                           @"text":@"哈哈",
                           @"user":@{
                                   @"idstr":@"19user",
                                   @"profile_image_url":@"http://tp4.sinaimg.cn/2316244583/50/40014787140/1",
                                   @"name":@"name"
                                   
                                   }
                           
                           
                           };
    
    
    Status * status = [Status objectWithKeyValues:dic];

    
}